package cn.zealon.readingcloud.book.service;

import cn.zealon.readingcloud.common.pojo.book.Book;
import feign.Body;
import feign.Headers;
import feign.Param;
import feign.RequestLine;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.HashMap;

@Api("采集服务")
@FeignClient("light-reading-cloud-collection")
@RequestMapping("/collect")
public interface CollectService {

    @ApiOperation("采集书籍发送到采集服务")
    /**
     * 向collection服务发送book以便采集
     */
    @Headers("Content-Type: application/json")
    @Body("{body}")
    @RequestMapping("/inputBooksToES")
    HashMap<String,Object> inputBooksToES(@Param("body") String bookJson);

}
